package org.trc.traffic;

import java.util.Date;

public class AggLinkTraffic {
	
    public String linkID;
	
	public float avgSpeed;
	
	public float avgTraveltime;
	
	public int gpsNum;
	
	public int carNum;
	
	public int dur = 5;
	
	public int timeInterval;
	
	public int hour;
	
	public Date day;
	
	public int status = -1; // -1 表示未识别状态 ， 0表示拥堵，1表示缓慢，2表示畅通
	
	public String clusterID = null; //0代表尚未聚类
	
	public int getTrafficStatus() {
		if (avgSpeed >= 0 && avgSpeed <= 15)
			return 0; // 拥堵 
		else if (avgSpeed > 15 && avgSpeed <= 35)
			return 1; // 缓慢
		else
			return 2; // 畅通
	}

	public void setClusterID(String clusterID){
		this.clusterID = clusterID;
	}

}
